the problem is with forward refs |
Re: Batch mode DXL fails -- Interative OK
Wrap the whole script in curly brackets
{
void fwd(string)
caller(string a)
{
fwd(a)
}
void fwd(string a)
{
print a "\n"
}
caller("hi")
}
|
Re: Batch mode DXL fails -- Interative OK SystemAdmin - Tue Nov 16 12:59:55 EST 2010
Wrap the whole script in curly brackets
{
void fwd(string)
caller(string a)
{
fwd(a)
}
void fwd(string a)
{
print a "\n"
}
caller("hi")
}
to devolve to a no-op. (no output, nada) I added writing to a stream instead of a print--no file created, nothing. As an aside--why SHOULD the above even work? I'm curious (as well as suicidally frustrated.) I'm running V8.2 just in case this matters. |
Re: Batch mode DXL fails -- Interative OK SystemAdmin - Wed Nov 17 03:21:38 EST 2010
I am pretty sure it was just a mistake when you put your example into the original post (as otherwise you would have got error messages) but the "void" in front of "caller" is missing in the original post.
{
void fwd(string)
void caller(string a)
{
fwd(a)
}
void fwd(string a)
{
print a "\n"
}
caller("hi")
}
start "DOORS" "C:\Program Files\Telelogic\DOORS_8.3\bin\doors.exe" -u abc-P xyz -b C:\TEMP\batch.dxl
|
Re: Batch mode DXL fails -- Interative OK SystemAdmin - Wed Nov 17 03:21:38 EST 2010
The DOORS parser seems to not recognize forward declarations properly when they are on the top level. When you run any script from the GUI, DOORS will automatically wrap your script with the following header:
{ Object obj = obj__
dxlAttrName = ...
// your script
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Batch mode DXL fails -- Interative OK SystemAdmin - Wed Nov 17 03:21:38 EST 2010 within the outer scope.) print "Can you spell HACK\n" { void fwd(string) caller(string a) { fwd(a) } void fwd(string a) { print a "\n" } caller("hi") } |